package com.itheima.service;

import com.itheima.dao.StudentDao;
import com.itheima.dao.StudentDaoImpl;
import com.itheima.domian.Student;

import java.util.List;

public class StudentServiceImpl implements StudentService{
   StudentDao studentDao = new StudentDaoImpl();
    @Override
    public List<Student> AllFindStudent() {
        List<Student> studentList = studentDao.AllFindStudent();
        return studentList;
    }

    @Override
    public Student  findStudent(int id) {
        return studentDao.findStudent(id);
    }

    @Override
    public int addStudent(Student student) {
        return studentDao.addStudent(student);
    }

    @Override
    public int updateStudent(Student student, int id) {
        return  studentDao.updateStudent(student,id);
    }

    @Override
    public int deleteStudent(int id) {

        return studentDao.deleteStudent(id);
    }
}
